home *** CD-ROM | disk | FTP | other *** search
-
-
- LibFile.doc
- ===========
-
-
- PostSIM and SIMBug both can load a definition file containing information
- about symbols to be created in general, i.e. library functions, system
- variables and hardware registers. The definition file is written in a
- simple script language enabling easy adding of further libraries or custom
- data by the user. It must be stored in the 'S:' directory as
- 'bug.libfile'.
-
- PostSIM and SIMBug will compile the definitions to a symbol list that can
- be used by SIM. The compiler uses an accumulator for the address that is
- used for the value of the next symbol to be defined. Strings beginning
- with a dollar sign are concidered to be commands, other strings are
- concidered to be symbol names. One command or symbol name is accepted per
- line.
-
- Symbols can consist of any characters except '$' characters, spaces and
- periods. If a symbol name ends on a space, a symbol with that name and the
- value currently stored in the accumulator is added to the symbol list and
- the default size is added to the accumulator. If the symbol ends on a
- period, what is after the period is interpreted as hexadecimal number which
- will be added to the accumulator instead of the default size I.e.:
-
-
- ExecBase.22 ;This is ExecBase
- SoftVer ;Softver
-
-
- Commands begin with a '$' character. The following commands are currently
- known:
-
-
-
- $ADDR [addr] Directly sets the accumulator to [addr].
-
-
- $JUMP [offset] Adds [offset] to the accumulator.
-
-
- $END Ends symbol definition. The rest of the
- file will be ignored.
-
-
- $ENDNODE Ends a symbol node. This is useful for
- optimisation. Before changing to i.e.
- another library, insert this command.
-
-
- $APTR Reads the longword at the address in the
- accumulator and stores it in the
- accumulator.
-
-
- $BCPL Same as $APTR but the pointer at that
- address is concidered to be a BCPL pointer
- and multiplied with four.
-
-
- $SIZE [size] Sets the default size which is added to
- symbols without size.
-
-
- $SAVE [num] Stores the accumulator in memory [num].
- [num] can vary from 1 to 8.
-
-
- $LOAD [num] Loads memory [num] to accumulator.
-
-
- $LIST The memory the accumulator points currently
- to is interpreted as a list and symbols
- with the names of all nodes and their
- addresses are created. The accumulator is
- then increased by the default size.
-
-
- $NODE The memory the accumulator currently points
- to is interpreted as a node structure and a
- symbol with the node address and its name
- is created. The accumulator is not
- changed.
-
-
- $LIBRARY [name] Tests if a node with the name [name] is in
- $DEVICE [name] the system list named by the command. If
- $RESOURCE [name] it is, the accumulator is loaded with the
- $MEMORY [name] node address. If it isn't, all symbol
- $INTERRUPT [name] definitions are ignored until a $ADDR,
- $PORT [name] $ENDTYPE or one of these commands is
- encountered. This is useful if you only
- want to define symbols for such an object
- if it is there.
-
- $LOADLIB [name] Opens and closes a library once to load it
- if it hasn't been loaded yet.
-
-
- $ENDTYPE Enables symbol definition again.
-
-
-
- In the distribution of SIM you will find definition files for KickStart
- 1.3, 2.0 and 3.0. You are welcome to add your own definitions, i.e. of
- your own libraries and such.
-
-
-